package com.jb.demo.forum;

import com.jb.demo.forum.domain.Forum;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class ForumService {
    List forums = new ArrayList();
    public ForumService() {
        int i=0;
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
        forums.add(new Forum(""+(i++), "first item"));
    }
    public void add(Forum forum) {
        forums.add(forum);
    }
    public Collection getForums() {
        return forums;
    }
}
